import java.util.Scanner;

import static java.time.Clock.system;
import static javafx.application.Platform.exit;

public class ManagerMenu {
    Scanner in = new Scanner(System.in);

    public ManagerMenu() {
        this.menu();
    }

    public void menu(){
        boolean flag= true;
        while(flag)
        {
            ManagerFile managerFile = new  ManagerFile();
            StudentFile studentFile = new StudentFile();
            System.out.println("=======欢迎进入管理系统=======");
            System.out.println("—————————请输入功能——————————");
            System.out.println("1.修改密码");
            System.out.println("2.查看个人信息");
            System.out.println("3.录入老师账号密码");
            System.out.println("4.修改老师信息");
            System.out.println("5.查看所有教师信息");
            System.out.println("6.查找老师信息");
            System.out.println("其他：退出管理员系统");
            System.out.println("---------------------------");
            String num = in.next();
            switch(num){
                case "1":managerFile.updatePwd();in.next();break;
                case "2":managerFile.printpwd();in.next();break;
                case "3":managerFile.inputTeacher();in.next();break;
                case "4":managerFile.updateTeacher();in.next();break;
                case "5":managerFile.findTeacherAll();in.next();break;
                case "6":managerFile.findTeacherOne();in.next();break;
                default:flag= false;
            }
        }

    }
}
